			import reportgeneration.Print;
			import MouCourse.MouCourse;
			
			import ProgramCourse.mxmlFile.ManageProgramCourseSetup;
			import ProgramCourse.mxmlFile.ProgramCourseSetup;
			
			import ProgramRegistration.ManageProgramRegistration;
			import ProgramRegistration.ProgramRegistration;
			
			import activityMaster.ActivityMaster;
			import activityMaster.ManageActivityMaster;
			
			import activityMasterControl.ActivityMasterControl;
			
			import advanceParentProgram.AdvanceParentProgram;
			
			import associateInstructorCourse.addInstructorCourse;
			import associateInstructorCourse.manageInstructorCourse;
			
			import awardBlankSheet.CreateAwardBlank;
			
			import buildActivityMaster.BuildActivityMaster;

			import cancelRegistration.CancelRegistration;
			
			import cgpaDivision.cgpaDivision;
			
			import courseEvaluationComponnent.courseEvaluationCompnent;
			
			import courseGroup.courseGroup;
			
			import courseMarksApproval.CourseMarksApproval;
			
			import courseMaster.CourseMaster;
			import courseMaster.ManageCourseMaster;
			
			import employeeMaster.ManageEmployeeMaster;
			import employeeMaster.employeeAuthoritySetup;
			import employeeMaster.employeeMaster;
			import employeeMaster.employeeRole;
			import employeeMaster.manageEmployeeAuthority;
			
			import entityMaster.EntityMaster;
			import entityMaster.ManageEntityMaster;
			
			import prestagingDataUpload.PrestagingDataSheetUpload;
			//import prestagingDataUpload.PrestagingDataUploadForAdmin;
			
			import evaluationComponent.evaluationComponent;
			
			import externalExaminarCourse.externalExaminarCourse;
			
			import common.ResetPassword;
			import employeeMaster.DeleteEmployeeRole;
			
			import mx.collections.*;
			import mx.controls.Alert;
			import mx.events.MenuEvent;
			
			import prestagingValidation.PrestagingActivity;
			
			import programCourseType.ProgramCourseType;
			
			import programGroup.GroupRule;
			import programGroup.ProgramGroup;
			
			import programMaster.ManageBasicProgramDetails;
			import programMaster.ManageProgramBranchSpecialization;
			import programMaster.ManageProgramDuration;
			import programMaster.ProgramMaster;
			
			import programOfferedBy.ManageEntityProgram;
			import programOfferedBy.ProgramOfferedBy;
			
			import programSwitch.CreateProgramSwitch;
			import programSwitch.ManageProgramSwitch;
			
			import programTermDetails.ManageProgramTermDetails;
			import programTermDetails.ProgramTermDetails;
			
			import reportgeneration.ProgressCard;
			import reportgeneration.SemesterWiseMarks;
			
			import studentEnrollment.StudentEnrollment;
			
			import studentMaster.studentMaster;

                        import studentRemedial.studentRemedials;
			
			import studentVerificationCheckList.StudentCheckList;
			
			import switchrule.switchRule;
			
			import systemTableTwo.SystemTableTwo;
			
			import universityReservation.UniversitySeatReservation;
			
			import universityWithMouUniversity.universityWithMou;
			
			import universitymaster.ManageUniversityMaster;
			import universitymaster.UniversityMaster;
			import universitymaster.createUniversityRoles;
			import universitymaster.manageUniversityRoles;
			import updatePrestagingTable.UpdatePrestagingTable;
			import awardBlankSheet.CreateAwardBlank;
			import buildActivityMaster.BuildActivityViaProgram;
			import reportgeneration.FinalSemesterResultStatistics;
			import reportgeneration.MajorGroupWiseMeritList;
			import reportgeneration.SubjectCategoryWiseStudentList;
			import studentRegistration.CheckDuplicateStudent;

			
			protected var menuBarCollection:ArrayCollection=new ArrayCollection();
			
			protected var usersXML:XML;
			[Bindable]protected var menuData:XMLListCollection;
			
			protected function menuHttpServiceResultHandler(event:ResultEvent):void{
				var menuString:String=event.result as XML;
				if(menuString.localeCompare("errorMenu")==1){
					Alert.show(commonFunction.getMessages('menuError')+" ( "+menuString.substring(10, menuString.length)+" ) "+ commonFunction.getMessages('checkLogFile'), 
						commonFunction.getMessages('error'),4,null,null,errorIcon);
				}
				else{
					usersXML= new XML(menuString);
					menuData =  new XMLListCollection(usersXML.*);
					vStack.selectedIndex=1;
				}
			}
						
			protected function menuHttpServiceFaultHandler(event:FaultEvent):void{
				Alert.show(commonFunction.getMessages('problemInService'),(commonFunction.getMessages('error')),4,null,null,errorIcon);	
			}
						
			// Event handler for the MenuBar control's itemClick event.
			private function menuHandler(event:MenuEvent):void  {
				var menuId:String=event.item.@menuId;
				//Alert.show("Clicked Menu id is: "+event.item.@menuId);					
				firstView(menuId);				
			}
			
			protected function firstView(menuId:String):void{
				switch(menuId)
				{

			case "MBA":
					{					
						var activityMasterControl:ActivityMasterControl=new ActivityMasterControl();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(activityMasterControl);
						break;

					}	
case "MBB":
					{					
						var prestagingActivity:PrestagingActivity=new PrestagingActivity();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(prestagingActivity);
						break;

					}		
						
					
					case "MABA":
					{
						var entityMaster:EntityMaster=new EntityMaster();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(entityMaster);							
						break;
					}
										
					case "MAGAA":
					{
						var activityMaster:ActivityMaster=new ActivityMaster();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(activityMaster);
						break;
					}
					case "MAGAB":
					{
						var manageActivityMaster:ManageActivityMaster=new ManageActivityMaster();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(manageActivityMaster);
						break;
					}
					case "MADEA":
					{
						var createProgramCourse:ProgramCourseSetup=new ProgramCourseSetup();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(createProgramCourse);
						break;
					}
					case "MADEB":
					{
						var manageProgramCourse:ManageProgramCourseSetup=new ManageProgramCourseSetup();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(manageProgramCourse);
						break;
					}
					case "MCJA":
					{
						var createprogramOfferedBy:ProgramOfferedBy=new ProgramOfferedBy();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(createprogramOfferedBy);
						break;
					}
					case "MABB":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new ManageEntityMaster());
						break;
					}
					case "MCMA":
					{
						var programTermDetails:ProgramTermDetails=new ProgramTermDetails();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(programTermDetails);
						break;
					}
					case "MCMB":
					{
						var manageProgramTermDetails:ManageProgramTermDetails=new ManageProgramTermDetails();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(manageProgramTermDetails);
						break;
					}
					
					case "MCNA":
					{
						var createProgramRegistration:ProgramRegistration=new ProgramRegistration();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(createProgramRegistration);
						break;
					}
					case "MCNB":
					{
						var manageProgramRegistration:ManageProgramRegistration=new ManageProgramRegistration();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(manageProgramRegistration);
						break;
					}

case "MACCA":
					{					
					var createEmpAuthority:employeeAuthoritySetup = new employeeAuthoritySetup();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(createEmpAuthority);
					break;
					}

					case "MACDA":
					{
						var createInstructorCourse:addInstructorCourse=new addInstructorCourse();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(createInstructorCourse);
						break;
					}
					case "MACDB":
					{
						var manageInstructorCourseObject:manageInstructorCourse=new manageInstructorCourse();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(manageInstructorCourseObject);
						break;
					}
						
					case "MAGAC":
					{
						var buildActivityMaster:BuildActivityMaster=new BuildActivityMaster();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(buildActivityMaster);
						break;
					}
						
					case "MAADB":
					{
					var MouCourseObj:MouCourse=new MouCourse();
		 			loaderCanvas.removeAllChildren();
		 			loaderCanvas.addChild(MouCourseObj);
					break;
					}
					
					case "MADH":
					{
		 			var advanceParentProgramObj:AdvanceParentProgram=new AdvanceParentProgram();
		 			loaderCanvas.removeAllChildren();
		 			loaderCanvas.addChild(advanceParentProgramObj);
						break;
					}
					
					case "MADG":
					{
					 var programCourseTypeObj:ProgramCourseType=new ProgramCourseType();
					 loaderCanvas.removeAllChildren();
					 loaderCanvas.addChild(programCourseTypeObj);
					break;
					}

					case "MAEB":
					{
		 			var courseGroupObj:courseGroup=new courseGroup();
		 			loaderCanvas.removeAllChildren();
		 			loaderCanvas.addChild(courseGroupObj);
					break;
					}
					
					case "MAFA":
					{
					var studentMasterObj:studentMaster=new studentMaster();
		 			loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(studentMasterObj);
					break;
					}
					

					case "MACAA":
					{
		 			var employeeMasterObj:employeeMaster=new employeeMaster();
		 			loaderCanvas.removeAllChildren();
		 			loaderCanvas.addChild(employeeMasterObj);
					break;
					}
					
					case "MACAB":
					{
		 			var ManageEmployeeMasterObj:ManageEmployeeMaster=new ManageEmployeeMaster();
		 			loaderCanvas.removeAllChildren();
		 			loaderCanvas.addChild(ManageEmployeeMasterObj);
					break;
					}
					
					
					case "SAB":
					{
					var switchRuleObj:switchRule=new switchRule();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(switchRuleObj);
					break;
					}
					
					case "SAG":
					{
					var cgpaDivisionObj:cgpaDivision=new cgpaDivision();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(cgpaDivisionObj);
					break;
					}
					
					case "SAA":
					{
					var evaluationComponentObj:evaluationComponent=new evaluationComponent();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(evaluationComponentObj);
					break;
					}
					
					case "MAHA":
					{
					var externalExaminarCourseObj:externalExaminarCourse=new externalExaminarCourse();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(externalExaminarCourseObj);
					break;
					}

					case "SAD":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new StudentCheckList());
					break;
					}
					
					case "MADFA":
					{
					var CreateProgramSwitchObj:CreateProgramSwitch=new CreateProgramSwitch();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(CreateProgramSwitchObj);
					break;
					}
					
					case "MADFB":
					{
					var ManageProgramSwitchObj:ManageProgramSwitch=new ManageProgramSwitch();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(ManageProgramSwitchObj);
					break;
					}
					case "MAABA":
					{
					var universityMasterObjct:createUniversityRoles = new createUniversityRoles();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(universityMasterObjct);
					break;
					}
					case "MAABB":
					{
					var manageUniversityRole:manageUniversityRoles = new manageUniversityRoles();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(manageUniversityRole);
					break;
					}
					case "MAAAA":
					{
					var createUniversity:UniversityMaster = new UniversityMaster();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(createUniversity);
					break;
					}
					case "MAAAB":
					{
					var manageUniversity:ManageUniversityMaster = new ManageUniversityMaster();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(manageUniversity);
					break;
					}
					case "MACBA":
					{
					var employeeRoleSetup:employeeRole=new employeeRole();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(employeeRoleSetup);
					break;
					}
					
					case "MACBB":
					{
						var deleteEmployeeRole:DeleteEmployeeRole=new DeleteEmployeeRole();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(deleteEmployeeRole);
						break;
					}
					
					case "MACCA":
					{					
					var createEmpAuthority:employeeAuthoritySetup = new employeeAuthoritySetup();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(createEmpAuthority);
					break;
					}
					
					case "MACCB":
					{
					var manageEmpAuthority:manageEmployeeAuthority = new manageEmployeeAuthority();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(manageEmpAuthority);
					break;
					}
					case "MCA":
					{
					var progressCard:ProgressCard = new ProgressCard();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(progressCard);
					break;
					}
					
					case "MCB":
					{
					var semesterWiseMarks:SemesterWiseMarks = new SemesterWiseMarks();
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(semesterWiseMarks);
					break;
					}
					
					case "MAACA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new UniversitySeatReservation);
					break;
					}
					
					case "MAEAB":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ManageCourseMaster);
					break;
					}
					
					case "MAEAA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new CourseMaster);
					break;
					}
						
					case "SAF":
					{
						var systemTableTwo:SystemTableTwo=new SystemTableTwo();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(systemTableTwo);
						break;
					}
					
					case "MAEB":
					{
		 			loaderCanvas.removeAllChildren();
		 			loaderCanvas.addChild(new courseGroup());
					break;
					}
					
					case "MAFA":
					{
					var studentMasterObj:studentMaster=new studentMaster();
		 			loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(studentMasterObj);
					break;
					}
					
					case "MAEC":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new CourseMarksApproval);
					break;
					}
					
					case "MAFB":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new StudentEnrollment);
					break;
					}
					
					case "MAADA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new universityWithMou);
					break;
					}
					
					case "SAC":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new courseEvaluationCompnent);
					break;
					}
					
					case "SAH":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new PrestagingDataSheetUpload);
					break;
					}
					
					case "SAI":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new ResetPassword);
						break;
					}
					
					//Amir ends here...

									
					case "MADAA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ProgramMaster());
					break;
					}
					
					case "MADABA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ManageBasicProgramDetails());
					break;
					}
					
					case "MADABB":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ManageProgramDuration());
					break;
					}
					
					case "MADABC":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ManageProgramBranchSpecialization());
					break;
					}
					
					case "MADCA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ProgramTermDetails());
					break;
					}
					
					case "MADCB":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ManageProgramTermDetails());
					break;
					}
					
						case "MADBA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ProgramOfferedBy());
					break;
					}
					
						case "MADBB":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ManageEntityProgram());
					break;
					}
					
						case "MADDA":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ProgramRegistration());
					break;
					}
					
						case "MADDB":
					{
					loaderCanvas.removeAllChildren();
					loaderCanvas.addChild(new ManageProgramRegistration());
					break;
					}

				
			
					//Ashutosh starts
					
					case "RAA":
					{
						var progressCardObj:ProgressCard=new ProgressCard();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(progressCardObj);
						break;
					}
					
					case "RAB":
					{
						var semesterWiseMarksObj:SemesterWiseMarks=new SemesterWiseMarks();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(semesterWiseMarksObj);
						break;
					}
                                        case "MCC":
						{
							var print:Print = new Print();
							loaderCanvas.removeAllChildren();
							loaderCanvas.addChild(print);
							break;
						}

					//Ashutosh menu ends here
					
					case "MADI":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new ProgramGroup());
						break;
					}
					
					case "MADJ":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new GroupRule());
						break;
					}
					
					case "RSAA":
					{
						var internalAwardBlank:CreateAwardBlank=new CreateAwardBlank();
						internalAwardBlank.displayType="I";
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(internalAwardBlank);
						break;
					}
					
					case "RSAB":
					{
						var externalAwardBlank:CreateAwardBlank=new CreateAwardBlank();
						externalAwardBlank.displayType="E";
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(externalAwardBlank);
						break;
					}
					
					case "RSAC":
					{
						var remedialAwardBlank:CreateAwardBlank=new CreateAwardBlank();
						remedialAwardBlank.displayType="R";
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(remedialAwardBlank);
						break;
					}

					case "RSB":
					{
						var studentRemedialsObj:studentRemedials=new studentRemedials();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(studentRemedialsObj);
						break;
					}
					
					case "MAGAD":
					{
						var buildActivityViaProgram:BuildActivityViaProgram=new BuildActivityViaProgram();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(buildActivityViaProgram);
						break;
					}
					
	
					case "MBD":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new CheckDuplicateStudent());
						break;
					}
				
					case "MBE":
					{
						var cancelRegistration:CancelRegistration=new CancelRegistration();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(cancelRegistration);
						break;
					}
					
					case "MCD":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new SubjectCategoryWiseStudentList());
						break;
					}
					
					case "MCE":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new FinalSemesterResultStatistics());
						break;
					}				
					
					case "MCF":
					{
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(new MajorGroupWiseMeritList());
						break;
					}

						case "MBCA":
					{
						var UpdatePrestagingTableObj:UpdatePrestagingTable=new UpdatePrestagingTable();
						loaderCanvas.removeAllChildren();
						loaderCanvas.addChild(UpdatePrestagingTableObj);
						break;
					}
									
					default:
					{
						break;
					}
				}
			}
			